package cn.icanci.loopstack.ddk.common.socket.trigger;

import cn.icanci.loopstack.ddk.common.socket.publish.PublishValueRefreshDTO;

import java.util.Objects;
import java.util.StringJoiner;

/**
 * App 配置
 * @author icanci
 * @since 1.0 Created in 2023/01/12 08:42
 */
public class ValueRefreshTriggerDTO extends TriggerDTO {

    private PublishValueRefreshDTO valueRefresh;

    public PublishValueRefreshDTO getValueRefresh() {
        return valueRefresh;
    }

    public void setValueRefresh(PublishValueRefreshDTO valueRefresh) {
        this.valueRefresh = valueRefresh;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;
        ValueRefreshTriggerDTO that = (ValueRefreshTriggerDTO) o;
        return Objects.equals(valueRefresh, that.valueRefresh);
    }

    @Override
    public int hashCode() {
        return Objects.hash(valueRefresh);
    }

    @Override
    public String toString() {
        return new StringJoiner(",").add("valueRefresh=" + valueRefresh).toString();
    }
}
